<template>
    <div style="width: 600px;height:400px;" ref="ce" id="myCharts">hhha</div>
</template>

<script>
import echarts from 'echarts';

export default {
    name: 'LineChart',
    mounted () {
        console.log(this.$el, 'ewq')
        

        var option = {
            xAxis: {
                type: 'category',
                data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
            },
            yAxis: {
                type: 'value'
            },
            series: [{
                data: [820, 932, 901, 934, 1290, 1330, 1320],
                type: 'line'
            }]
        };
        // 注意，option在setOption中设置
        this.chart = echarts.init(this.$el);
        this.chart.setOption(option)
        console.log(this.chart)

        
    }
}
</script>